<template>
	<view class="video ml-10 mr-10 mb-10">
		<video 
			class="videoCT" 
			id="myVideo" 
			:src="asData.parameters.list[0].url" 
			:autoplay="autoplay"
			:poster="asData.parameters.list[0].image">
		</video>
	</view>
</template>

<script>
	export default {
		name: "asData",
		props: {
			asData: {
				type: Object,
				required: true,
			}
		},
		data() {
			return {
				autoplay: false
			}
		},
		created() {
			if (this.asData.parameters.autoplay == 'true' || this.asData.parameters.autoplay == true) {
				this.autoplay = true;
			}

		},
		onReady: function(res) {
			// #ifndef MP-ALIPAY
			this.videoContext = uni.createVideoContext('myVideo')
			// #endif
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.video {
		border-radius: 8px;
		.videoCT {
			width: 100%;
			min-height: 100px;
		}
	}
</style>